<?php
if (isset($_GET['videoid'])) {
	$doc = new DOMDocument();
	$doc->load('http://gdata.youtube.com/feeds/api/videos/'.$_GET['videoid']);
	$title = $doc->getElementsByTagName('title')->item(0);
	$infos = array();
	$infos['title'] = $title->textContent;
	echo json_encode($infos);
}
?>